package com.warmheart.builder.access;

import com.warmheart.core.rs.base.BaseRsBuilder;
import com.warmheart.core.rs.oper.Rs;
import com.warmheart.entity.access.AccessRequest;

/**
 * 
 * @ClassName: AccessRequest
 * @Description: 权限申请实体RsBuilder类，对应表名称为tb_access_request
 *               温馨提示：不要修改该实体RsBuilder类的任何字段
 * @author ZhangJianyang
 * @date 2025年06月16日 下午13:05:35
 *
 */
public class AccessRequestRsBuilder extends BaseRsBuilder<AccessRequest, AccessRequestRsBuilder> {

    private final AccessRequest t;

    @Override
    protected AccessRequestRsBuilder self() {
        return this;
    }

    @Override
    public AccessRequest core() {
        return this.t;
    }

    public AccessRequestRsBuilder(AccessRequest accessRequest) {
        t = accessRequest;
    }

    /**
     * 申请人ID
     */
    private Rs<AccessRequest, AccessRequestRsBuilder> applicantId;

    /**
     * 资源类型
     */
    private Rs<AccessRequest, AccessRequestRsBuilder> resourceType;

    /**
     * 资源ID
     */
    private Rs<AccessRequest, AccessRequestRsBuilder> resourceId;

    /**
     * 访问类型
     */
    private Rs<AccessRequest, AccessRequestRsBuilder> accessType;

    /**
     * 申请理由
     */
    private Rs<AccessRequest, AccessRequestRsBuilder> reason;

    /**
     * 审批状态
     */
    private Rs<AccessRequest, AccessRequestRsBuilder> state;

    /**
     * 审批意见
     */
    private Rs<AccessRequest, AccessRequestRsBuilder> reviewComment;

    /**
     * 过期时间(临时权限)
     */
    private Rs<AccessRequest, AccessRequestRsBuilder> expiresTime;

    public Rs<AccessRequest, AccessRequestRsBuilder> applicantId() {
        if (this.applicantId == null) {
            this.applicantId = new Rs<AccessRequest, AccessRequestRsBuilder>(self(), "applicant_id", "applicantId");
        }
        return this.applicantId;
    }

    public Rs<AccessRequest, AccessRequestRsBuilder> resourceType() {
        if (this.resourceType == null) {
            this.resourceType = new Rs<AccessRequest, AccessRequestRsBuilder>(self(), "resource_type", "resourceType");
        }
        return this.resourceType;
    }

    public Rs<AccessRequest, AccessRequestRsBuilder> resourceId() {
        if (this.resourceId == null) {
            this.resourceId = new Rs<AccessRequest, AccessRequestRsBuilder>(self(), "resource_id", "resourceId");
        }
        return this.resourceId;
    }

    public Rs<AccessRequest, AccessRequestRsBuilder> accessType() {
        if (this.accessType == null) {
            this.accessType = new Rs<AccessRequest, AccessRequestRsBuilder>(self(), "access_type", "accessType");
        }
        return this.accessType;
    }

    public Rs<AccessRequest, AccessRequestRsBuilder> reason() {
        if (this.reason == null) {
            this.reason = new Rs<AccessRequest, AccessRequestRsBuilder>(self(), "reason", "reason");
        }
        return this.reason;
    }

    public Rs<AccessRequest, AccessRequestRsBuilder> state() {
        if (this.state == null) {
            this.state = new Rs<AccessRequest, AccessRequestRsBuilder>(self(), "state", "state");
        }
        return this.state;
    }

    public Rs<AccessRequest, AccessRequestRsBuilder> reviewComment() {
        if (this.reviewComment == null) {
            this.reviewComment = new Rs<AccessRequest, AccessRequestRsBuilder>(self(), "review_comment", "reviewComment");
        }
        return this.reviewComment;
    }

    public Rs<AccessRequest, AccessRequestRsBuilder> expiresTime() {
        if (this.expiresTime == null) {
            this.expiresTime = new Rs<AccessRequest, AccessRequestRsBuilder>(self(), "expires_time", "expiresTime");
        }
        return this.expiresTime;
    }
}